﻿using System;

public class Mapper079 : MapperDefault
{
    public override void init(NES nes)
    {
        base.init(nes);
    }

    public override void loadROM(ROM rom)
    {
        if (rom.Valid)
        {
            this.loadPRGROM();
            this.loadCHRROM();
            base.nes.Cpu.requestIrq(2);
        }
    }

    public override void writelow(int address, short value_Renamed)
    {
        if (address < 0x4000)
        {
            base.writelow(address, value_Renamed);
        }
        if ((address < 0x6000) & (address >= 0x4100))
        {
            int bank = (value_Renamed & 8) >> 3;
            int num2 = value_Renamed & 7;
            this.load32kRomBank(bank, 0x8000);
            this.load8kVromBank(num2, 0);
        }
    }
}

